﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using COC.Commons;

namespace COC.Tool
{
    public partial class PlanTaskManagerConfigView : Form
    {
        private readonly PlanTaskManagerConfig _PlanTaskManagerConfig = new PlanTaskManagerConfig();

        public PlanTaskManagerConfigView()
        {
            InitializeComponent();
            this.PathText.Text = _PlanTaskManagerConfig.SyncPath;
        }

        private void ClearData_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("您真的要删除吗？", "此删除不可恢复", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                MessageBox.Show(@"真的删了!", @"!!!",MessageBoxButtons.OK);
            }
        }

        private void ChangePath_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog path = new FolderBrowserDialog();
            path.ShowDialog();
            if (string.IsNullOrEmpty(path.SelectedPath))
            {
                return;
            }
            this.PathText.Text = path.SelectedPath;
        }

        private void ConfigYes_Click(object sender, EventArgs e)
        {
            //如果有文件复制到新路径，如果没有文件在新路径创建文件
            this.Close();
        }

        private void ConfigNo_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
